const express = require('express')
const path = require('path')

const bodyParser = require('body-parser')
const router = require('./router')
const app = express()


app.set('view engine','ejs')
app.use(bodyParser.urlencoded({extended:false}))
app.use(bodyParser.json())
app.use('/public',express.static(path.join(__dirname,'./public')))
app.use('/node_modules',express.static(path.join(__dirname,'./node_modules')))

router(app)


app.listen(3005,()=>{
    console.log(`服务已启动,端口号3005`);
})